<template>
    <el-table
      :data="orderData"
      
      style="width: 100%">

       
    <el-table-column
      prop="orderFormNo"
      label="订单编号"
      width="170">
    </el-table-column>


    <el-table-column
      prop="orderFormDestination"
      label="目的地"
      width="70px">
    </el-table-column>

    <el-table-column
      prop="orderFormOrigin"
      label="出发地"
      width="70px">
    </el-table-column>

    <el-table-column
      prop="orderFormPeopleNum"
      label="人数"
      width="50px">
    </el-table-column>

    <el-table-column
      prop="orderFormBudget"
      label="预算"
      width="90px">
    </el-table-column>

    <el-table-column
      prop="orderFormTime"
      label="计划天数"
      width="90px">
    </el-table-column>

    <el-table-column
      prop="orderFormDate"
      label="出行日期"
      width="120px">
    </el-table-column>

    <el-table-column
      prop="orderFormDesc"
      label="个性化需求"
      width="390px">
    </el-table-column>

  
      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button
          v-model="orderFormNo"
          type="warning"
            size="mini"
            @click="customized(scope.row.orderFormNo)">定制/修改方案</el-button>
            <el-button
          v-model="orderFormNo"
          type="danger"
            size="mini"
            @click="cancel(sscope.row.orderFormNo)">申请取消</el-button>
        </template>
      </el-table-column>
  
  </el-table>
  </template>
  
  <script>
   export default {
      data() {
        return {
          orderFormNo:'',
          customizationStaffId:1319,
          orderData: [{
            customizationStaffId:'',
            orderFormNo:''
          }]
        }
      },
      methods: {
        cancel(orderFormNo){
          this.orderData.orderFormNo = orderFormNo;
          window.alert(this.orderData.orderFormNo);
        // this.$axios.put("/orders/c",this.in).then((response) =>{
        //   if (response.data.code == 200) {
        //   this.$message.success(response.data.message);
        //   }else{
        //     this.$message.error("接单失败！");
        //   }
        //   this.loadOrders();
        // });
        },
        loadOrders(){
          this.orderData.customizationStaffId = this.customizationStaffId
          // window.alert(this.orderData.customizationStaffId);
          this.$axios.get("/orders/l/"+this.orderData.customizationStaffId).then(responser=> {
              this.orderData = responser.data.data.orderData
          })
      },
        customized(orderFormNo) {
          sessionStorage.setItem(
            "t1",
            orderFormNo
          );
          this.$router.push(
            "/CustomPage"
          );
        }
      },
      mounted(){
        this.loadOrders();
        
      }
    }
  </script>